package com.example.comment_oa.pojos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 差旅报销标准
 * @TableName standard
 */
@TableName(value ="standard")
@Data
public class Standard implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer standardId;

    /**
     * 
     */
    private String budgetKm;

    /**
     * 
     */
    private Double standardBz;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Standard other = (Standard) that;
        return (this.getStandardId() == null ? other.getStandardId() == null : this.getStandardId().equals(other.getStandardId()))
            && (this.getBudgetKm() == null ? other.getBudgetKm() == null : this.getBudgetKm().equals(other.getBudgetKm()))
            && (this.getStandardBz() == null ? other.getStandardBz() == null : this.getStandardBz().equals(other.getStandardBz()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getStandardId() == null) ? 0 : getStandardId().hashCode());
        result = prime * result + ((getBudgetKm() == null) ? 0 : getBudgetKm().hashCode());
        result = prime * result + ((getStandardBz() == null) ? 0 : getStandardBz().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", standardId=").append(standardId);
        sb.append(", budgetKm=").append(budgetKm);
        sb.append(", standardBz=").append(standardBz);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}